/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <cstdio>
#include <cstring>
using namespace std;

int main_1031()
{
    char U[81]={0};
    scanf("%s",U);
    int len=strlen(U);
    int n=(int)((len+2)/3);
    int n2=len-2*n+2;
    for (int i=0;i<(n-1) ;++i )
    {
        printf("%c",U[i]);
        for (int j=0;j<(n2-2) ;++j )
        {
            printf(" ");
        }
        printf("%c\n",U[len-i-1]);
    }
    for (int i=n-1; i<(n+n2-1);++i )
    {
        printf("%c",U[i]);
    }
	return 0;
}
